<div>
  <form class="form-horizontal" role="form" novalidate name="myForm">
    <div class="form-ctrl md-whiteframe-z1">
      <div class="form-search" style="height:190px;" ng-class="{true: 'shou'}[!flag.state]" ng-switch on="params.timeType">
        <div >
          <label style="width:70px">周期</label>
          <md-select ng-model="params.timeType" placeholder="月">
            <md-option ng-value="tp.timeType" ng-repeat="tp in timeTypes">{{tp.timeTypeName}}</md-option>
          </md-select>
        </div>
        <div ng-switch-when="3">
          <md-input-container flex>
            <label>开始时间</label>
            <input type="month" ng-model="params.startTime"  time-validate="month" end-time="params.endTime" required
                   name="startMonth">
            <div ng-messages="myForm.startMonth.$error">
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div ng-switch-when="3">
          <md-input-container flex>
            <label>结束时间</label>
            <input type="month" ng-model="params.endTime"  time-validate="month" start-time="params.startTime"
                   required name="endMonth">
            <div ng-messages="myForm.endMonth.$error">
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <input-quarter-group ng-switch-when="4" current-time="params.startTime" start-time="params.startTime" end-time="params.endTime"></input-quarter-group>
        <div ng-switch-when="5">
          <md-input-container flex>
            <label>开始时间</label>
            <input type="number" ng-model="params.startTime"  time-validate="year" end-time="params.endTime"  required name="startYear">
            <div ng-messages="myForm.startYear.$error" >
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div ng-switch-when="5">
          <md-input-container flex>
            <label>结束时间</label>
            <input type="number" ng-model="params.endTime"  time-validate="year" start-time="params.startTime" required name="endYear">
            <div ng-messages="myForm.endYear.$error" >
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div style="margin-top:15px;width:350px;">
            <md-radio-group ng-model="params.changeTypeCode" class="md-primary" style="display:inline-block;">
              <md-radio-button value="1"  style="display: inline-block;">按系统工作量</md-radio-button>
              <md-radio-button value="2"  style="display: inline-block;">按开发者工作量</md-radio-button>
            </md-radio-group>
        </div>
      </div>
      <i class="glyphicon glyphicon-chevron-up shrinkage" ng-show="flag.arrow" ng-click="flag.state = false"></i>
      <md-button ng-disabled="myForm.$invalid" ng-click="search()" class="md-fab md-primary md-hue-1" aria-label="Profile">
      <i class="glyphicon glyphicon-arrow-down" style="margin-top:28px;"  ng-show="!flag.state"></i>
      <i class="glyphicon glyphicon-search" ng-show="flag.state"></i>
      </md-button>
    </div>
  </form>
  <div class="table-info">
    <switching-button flag="flag" export-url="{{formPrefix}}" export-value="outData"></switching-button>
    <div ng-show="flag.show === 'view'">
      <div id="doc" style="height:450px;"></div>
    </div>
    <div>
    <div ng-show="flag.show === 'table'">
      <div class="table-detail" >
        <div class="t_r">
          <table class="table table-bordered">
          <caption style="text-align:center;font-size:large;font-weight:bold;color:black">{{params.title}}</caption>
          <thead>
            <tr>
              <th>时间</th>
              <th>{{changeType}}</th>
              <th>工作量占比</th>
            </tr>
          </thead>
            <tbody>
              <tr ng-repeat="item in items">
               <td>{{item.time}}</td>
               <td>{{item.filedName}}</td>
               <td>{{item.percentage}}</td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
  </div>
</div>